<!--  -->
<template>
  <div>
    <Header></Header>
    <div><span>
      dfdfd</span>
      
      
      
      
      
      
      
      </div>
    <div class="main" id="conter">
      <el-row class="topsearch">
        <el-col class="searform">
          <el-select
            size="medium"
            class="searchselect"
            v-model="value"
            placeholder="请选择"
          >
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
          <el-input
            class="inputtext"
            size="medium"
            placeholder="请输入内容"
            v-model="bookname"
            clearable
          >
          </el-input>
          <el-button
            type="primary"
            size="medium"
            icon="el-icon-search"
            @click="search()"
            >搜索</el-button
          >
        </el-col>
      </el-row>
      <el-container class="elcontainer">
      
        <el-container>
          <div id="navicontent" class="navicontent">
            <el-row class="result-function">
              <el-col :span="12" class="left">
                <div id="page_showtext" class="page-total">
                  共找到
                  <div id="RecTotal1">{{ total }}</div>
                  条，当前
                  <div id="ShowPage1">{{ page }}</div>
                  /
                  <div id="PageTotal1">{{ totalPage }}</div>
                  页
                </div>
              </el-col>

            </el-row>
            <el-divider class="eldivider"></el-divider>
            <div class="result">
              <TableList v-if="shows == 3" :tableData="booklist"> </TableList>
              <dl v-if="shows == 2">
                <dd v-for="item in booklist" :key="item.id">

                  <div class="clear"></div>
                </dd>
              </dl>
            </div>
            <div class="paginationdiv">
              <el-pagination
                background
                layout="total,prev, pager, next,jumper"
                :total="total"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
              >
              </el-pagination>
            </div>
          </div>
        </el-container>
      </el-container>
    </div>
  </div>
</template>

<script>


import TableList from "./tablelist.vue";
import Header from "../common/header.vue";
import { findpagewx } from "@/api/book";
export default {
  name: "",
  components: { Header, TableList },
  props: {},
  data() {
    return {
      checkedyears:[],
      bookcls:[],
      booklist: [],
      yearlist: [],
      activeNames: ["1"],
      bookname: "",
      select: "",
      input3: "",
      page: 1,
      pagesize: 15,
      totalPage: 20,
      total: 1000,
      year: "",
      options: [
        {
          value: "bookname",
          label: "书名",
        }
       
      ],
      value: "bookname",
      input: "",
      shows: 3,
      show3:true,
      show2:true,
      isupfold1:'on',
      isupfold2:'on',
      newArr:[],
        props: {
          label: 'name',
          children: 'child',
         
        },
        syscheckcodes:[],
    };
  },
  computed: {},
  watch: {}, created() {},
  
  mounted() {
    this.getDataList();
    console.log("我爱中国馆")
  },
  methods: {
    async getDataList() {
      var data = await findpagewx({
        bookname: this.bookname,
        page: this.page,
        limit: this.pagesize,
      });
      console.log(data.data.data);
      this.booklist = data.data.data.list;
      this.total = data.data.data.totalCount;
      this.totalPage = data.data.data.totalPage;
    },
 
    handleChange(val) {
      console.log(val);
    },
    search() {
      this.page = 1;
      this.getDataList();
    },
    handleSizeChange(val) {},
    handleCurrentChange(val) {
      document.getElementById("conter").scrollIntoView();
      this.page = val;
      this.getDataList();
    },
    activemode(val) {
      this.shows = val;
    },

  },
};
</script>
<style lang='css' scoped>
body {
  background-color: #000;
}
.main {
  margin-top: 80px;
}

.topsearch {
  padding: 20px 20px 20px 20px;
  margin: 0 auto;
  background-color: #f3f3f3;
  text-align: center;
}
.searform {
  height: 50px;
  line-height: 50px;
}
.inputtext {
  width: 500px;
  height: 50px;
  line-height: 50px;
}
.searchselect {
  width: 100px;
}
.elcontainer {
  /* margin-top: 20px; */
  padding: 20px;
  width: 1200px;
  margin: 0 auto;
}
.result {
  padding-left: 30px;
}
.result dd {
  border-bottom: 1px dashed #e6736e;
}
.result dd {
  position: relative;
  margin-right: 20px;
  padding-top: 20px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #d4d4d4;
  clear: both;
  overflow: hidden;
}
.re_tag {
  min-width: 80px;
  font-size: 14px;
  color: #87cbd6;
  text-align: center;
  float: left;
}
.re_brief {
  min-height: 113px;
  width: 68%;
  float: left;
  min-width: 598px;
  max-width: 1300px;
  padding-left: 20px;
}
.re_brief h1,
.re_navibrief h1 {
  margin-bottom: 10px;
  font-weight: normal;
  line-height: 24px;
  color: #0077cb;
  font-size: 16px;
  font-family: "microsoft Yahei";
}
.re_brief h1 a,
.re_navibrief h1 a {
  color: #005cd9;
}
.re_brief li,
.re_navibrief li {
  line-height: 20px;
  font-size: 12px;
  color: #666;
}
.re_brief li span,
.re_navibrief li span {
  display: inline-block;
  /* max-width: 46%; */
  margin-right: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  *line-height: 25px;
  font-size: 12px;
}
.img-thumb img,
.colPic img {
  border: 1px solid #e6736e;
}
.img-thumb img {
  width: 100px;
  border: 1px solid #dfdfdf;
  padding: 2px;
  display: inline;
}
.navicontent {
  width: 100%;
  border: 1px solid #d9d9d9;
  margin-left: 30px;
}
.result-funtion .page-total {
  display: inline;
  float: right;
  max-width: 360px;
  text-align: right;
  padding-right: 15px;
}
.left {
  float: left;
}
.right {
  float: right;
}
.page-total div {
  display: inline;
  font-size: 14px;
}
.paginationdiv {
  text-align: center;
  padding: 10px;
}
.iconcls {
  font-size: 16px;
}
::v-deep(.el-divider--horizontal) {
  margin: 0px;
}
.result-function {
  height: 40px;
  line-height: 40px;
  padding: 0 10px;
}
.change-list {
  float: right;
  height: 18px;
  padding: 9px 0;
  line-height: 18px;
}
.change-list li {
  display: inline-block;
  width: 25px;
  height: 22px;
  margin-left: 9px;
  border-radius: 2px;
  border: 1px solid #cecfd1;
  cursor: pointer;
}
.change-list li i {
  display: block;
  width: 16px;
  height: 16px;
  margin: 3px 4px;
}
.change-list i {
  background-image: url(../../assets/img/kns8-icon-sprite.png);
  background-repeat: no-repeat;
  transition: background 0.3s ease;
}
.change-list .icon-table {
  background-position: -60px -80px;
}
.change-list .active .icon-table {
  background-position: -60px -100px;
}
.change-list .icon-detail {
  background-position: -40px -80px;
}
.change-list .active .icon-detail {
  background-position: -40px -100px;
}
.change-list .icon-picture {
  background-position: -121px -3px;
}
.change-list .active .icon-picture {
  background-position: -121px -23px;
}

.sidebar-filter {
  width: 230px;
}

.sidebar-filter dl+dl {
    margin-top: 10px;
}

.sidebar-filter dl {
  border: 1px solid #ebebeb;
  box-shadow: 0 2px 3px 0 rgb(210 210 210 / 75%);
  -o-box-shadow: 0 2px 3px 0 rgba(210, 210, 210, 0.75);
  -ms-box-shadow: 0 2px 3px 0 rgba(210, 210, 210, 0.75);
  -moz-box-shadow: 0 2px 3px 0 rgba(210, 210, 210, 0.75);
  -webkit-box-shadow: 0 2px 3px 0 rgb(210 210 210 / 75%);
}
.sidebar-filter dt.tit {
  color: #333;
  background-color: #e3ecfd;
}
.sidebar-filter dt {
  position: relative;
  z-index: 1;
  height: 38px;
  line-height: 38px;
  font-size: 14px;
  font-weight: bold;
  clear: both;
}
.sidebar-filter dd {
  position: relative;
  z-index: 2;
  width: 226px;
  overflow: hidden;
  padding-bottom: 18px;
}
.sidebar-filter dd .resultlist ul {
  float: left;
  width: 224px;
  padding-top: 7px;
  padding-bottom: 10px;
  max-height: 268px;
  overflow-y: auto;
}
.sidebar-filter dl li {
  padding-left: 12px;
  line-height: 25px;
  clear: both;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  *line-height: 25px;
}
.sidebar-filter dt.tit b {
    display: block;
    padding-left: 12px;
}
.sidebar-filter dt.tit .icon {
    position: absolute;
    z-index: 2;
    cursor: pointer;
}

.sidebar-filter dt .icon-arrow {
    top: 12px;
    right: 15px;
    width: 10px;
    height: 20px;
    background: url(../../assets/img/icon-jt.png) no-repeat -10px -20px;
}

.sidebar-filter .off .icon-arrow {
    background-position: 0 -20px;
}
</style>